from utils.MQ.MQ_class import MQ
from message import send_message
import json

name_que_send = 'epai.point.cloud.AIQueue'
auth_name_send = "ppai"
auth_pwd_send = "ppai"
address_dateway_send = "192.168.1.145"
exchange_type = 'fanout'
address_port_send = 5672
time_sleep_send = 3
virtual_host_send = "/"
auto_ack_send = True
durable_send = True
MQ_send = MQ(name_que_send, auth_name_send, auth_pwd_send, address_dateway_send, address_port_send,
             virtual_host_send, auto_ack_send, exchange_type, durable_send)
connection_send = MQ_send.create_MQ()

message = {
    "task_id": 666,
    "task_type": '30',
    "point_cloud_file": r"D:\hycx_work\point_cloud-deal\detection_3d\data\final_3d_data\proNo1_11_up.npy",
    "direction": 0,
}

message = {
    "task_id": 666,
    "task_type": '30',
    "point_cloud_file": r"D:\hycx_work\point_cloud-deal\detection_3d\data\final_3d_data\123456_side.npy",
    "direction": 1,
}

message = {
    "task_id": 666,
    "task_type": '30',
    "point_cloud_file": r"D:\hycx_work\point_cloud-deal\detection_3d\data\none_data\35051772623505277134A0511210005195_up.npy",
    "direction": 0,
}
message = {
    "task_id": 666,
    "task_type": '101',
    "programNo_set": 1,
}

message = {
    "task_id": 666,
    "task_type": '102',
    "dmc": "1224214",
    "direction": 1
}

# message = {
#     "task_id": 888,
#     "task_type": '50',
#     "file": "D:\\hycx_work\\point_cloud-deal\\detection_3d\\data\\test.png",
# }

# message = {
#     "task_id": 777,
#     "task_type": '40',
#     "file": "D:\\hycx_work\\point_cloud-deal\\detection_3d\\data\\test.png",
# }

send_message(MQ_send, connection_send, json.dumps(message, ensure_ascii=False))
